#ifndef MESSAGEBOX_H
#define MESSAGEBOX_H

#include <QtGui/QWidget>
#include <QTimer>
#include <QCloseEvent>

namespace Ui {
    class messagebox;
}

class messagebox : public QWidget {
    Q_OBJECT
public:
    messagebox(QWidget *parent = 0);
    ~messagebox();
    void showMessageBox(const QString &message, int showTime, int sendTime);

protected:
    void changeEvent(QEvent *e);

private:
    int seconds;
    Ui::messagebox *m_ui;
    QTimer *closetimer;
    void closeEvent(QCloseEvent *event);

private slots:
    void timerFunc();
};

#endif // MESSAGEBOX_H
